package com.demo2do.boyle.common.entity.customer;

import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;

import com.demo2do.boyle.common.entity.geo.Geo;
import com.demo2do.core.web.format.PersistentFormat;

public class Profile {
	
	/** 用户头像 */
    private String avatar;
    
    /** 昵称 */
    private String nickName;
    
    @ManyToOne(optional = true, fetch = FetchType.LAZY)
    @PersistentFormat(key = String.class)
    private Geo province;

    @ManyToOne(optional = true, fetch = FetchType.LAZY)
    @PersistentFormat(key = String.class)
    private Geo city;
    
    
    private Integer age;

    @Enumerated(EnumType.ORDINAL)
    private Sex sex;
    
    /**
     * the default construct
     */
    public Profile() {
    	
    }
    
    public Profile(String avatar, String nickName, Geo province, Geo city, Integer age, Sex sex) {

    	this.avatar = avatar;
    	this.nickName = nickName;
    	this.province = province;
    	this.city = city;
    	this.age = age;
    	this.sex = sex;
    }
   
	/**
	 * @return the avatar
	 */
	public String getAvatar() {
		return avatar;
	}

	/**
	 * @return the nickName
	 */
	public String getNickName() {
		return nickName;
	}

	/**
	 * @return the province
	 */
	public Geo getProvince() {
		return province;
	}

	/**
	 * @return the city
	 */
	public Geo getCity() {
		return city;
	}

	/**
	 * @return the age
	 */
	public Integer getAge() {
		return age;
	}

	/**
	 * @return the sex
	 */
	public Sex getSex() {
		return sex;
	}

	/**
	 * @param avatar the avatar to set
	 */
	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	/**
	 * @param nickname the nickname to set
	 */
	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	/**
	 * @param province the province to set
	 */
	public void setProvince(Geo province) {
		this.province = province;
	}

	/**
	 * @param city the city to set
	 */
	public void setCity(Geo city) {
		this.city = city;
	}

	/**
	 * @param age the age to set
	 */
	public void setAge(Integer age) {
		this.age = age;
	}

	/**
	 * @param sex the sex to set
	 */
	public void setSex(Sex sex) {
		this.sex = sex;
	}

}
